<Grid
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  TextBlock.FontSize="10" VerticalAlignment="Top" Background="{Binding ImageBackground}" HorizontalAlignment="Left" x:Name="brd"   Width="{Binding Width}" Height="{Binding Height}" MaxWidth="{Binding MaxWidth}" MaxHeight="{Binding MaxHeight}" >
    <Grid>
        <Grid.Effect>
            <DropShadowEffect Opacity="{Binding ShadowOpacity}" BlurRadius="{Binding ShadowBlurRadius}" Color="{Binding ShadowColor}" Direction="{Binding ShadowDirection}" RenderingBias="Performance" ShadowDepth="{Binding ShadowDepth}" />
        </Grid.Effect>

        <Grid Margin="{Binding Margin}" x:Name="myroot">
        <Grid.LayoutTransform>
            <RotateTransform Angle="{Binding Rotation}"/>
        </Grid.LayoutTransform>

        <Border CornerRadius="{Binding CornerRadius}"  BorderThickness="{Binding BorderThickness}" BorderBrush="{Binding BorderBrush}" Padding="{Binding Padding}">

            <Border.Background>
                <SolidColorBrush  Color="{Binding BackgroundColor}" />
            </Border.Background>


            <Grid Width="{Binding ImageWidth}" Height="{Binding ImageHeight}" HorizontalAlignment="{Binding ImageHorizontalAlignment}" VerticalAlignment="{Binding ImageVerticalAlignment}">
                <Border CornerRadius="{Binding InnerCornerRadius}" BorderBrush="{Binding InnerBorderBrush}" BorderThickness="{Binding InnerBorderThickness}"  >
                    <Border.Background>
                        <SolidColorBrush Color="{Binding InnerBackgroundColor}" />
                    </Border.Background>
                </Border>
                <Image Source="{Binding Image}"  Stretch="{Binding Stretch}" Margin="{Binding InnerPadding}"/>

                <Border CornerRadius="{Binding InnerCornerRadius}" BorderBrush="{Binding InnerBorderBrush}" BorderThickness="{Binding InnerBorderThickness}"  >
                </Border>
            </Grid>
        </Border>

        <Image Visibility="{Binding WatermarkVisibility}" Source="{Binding Watermark}" Opacity="{Binding WatermarkOpacity}" Width="{Binding WatermarkWidth}" Height="{Binding WatermarkHeight}" Margin="{Binding WatermarkMargin}" HorizontalAlignment="{Binding WatermarkHorizontalAlignment}" VerticalAlignment="{Binding WatermarkVerticalAlignment}" MaxHeight="{Binding ElementName=myroot, Path=ActualHeight}" MaxWidth="{Binding ElementName=myroot, Path=ActualWidth}" />
        <TextBlock  TextWrapping="Wrap" Visibility="{Binding TextVisibility}"  Margin="{Binding TextMargin}"  Text="{Binding Text}" Foreground="{Binding Foreground}" HorizontalAlignment="{Binding TextHorizontalAlignment}" VerticalAlignment="{Binding TextVerticalAlignment}" FontSize="{Binding FontSize}" FontFamily="{Binding FontFamily}" FontWeight="{Binding FontWeight}" FontStyle="{Binding FontStyle}" FontStretch="{Binding FontStretch}" />

    </Grid >

</Grid>
</Grid>
